Re: [SQL] Setting Next Value in Sequence - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] Setting Next Value in Sequence
Date
Msg-id l03110709b3140b6fb964@[147.233.159.109]
Whole thread Raw
In response to Re: [SQL] Setting Next Value in Sequence  ("Tim Perdue" <perdue@raccoon.com>)
List pgsql-sql
At 15:06 +0200 on 16/3/99, Tim Perdue wrote:


> May table is defined to use the sequence, and the table is not trivial to
> export and rebuild with the new sequence.
>
> There's got to be some way around this. I'm probably going to have to create
> a bogus table using that sequence, then insert 150,000 bogus records to
> increment the sequence. Then drop the table.

What? You just need to drop and create a sequence with the same name. At
least it works for me (though I noticed that unprivileged users have
problems creating tables without having the sequences created first, which
IMHO is a bug. But I don't think it applies to already-created tables).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-sql by date:

Previous
From: Patrik Kudo
Date:
Subject: Re: [SQL] Setting Next Value in Sequence
Next
From: Remigiusz Sokolowski
Date:
Subject: Re: [SQL] Setting Next Value in Sequence